home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
server.arc
/
SERVER.H
< prev
next >
Wrap
Text File
|
1989-11-29
|
2KB
|
59 lines
/*------------------------------------------------*
* Named Pipes server header file *
* *
* Written by: Stephen T. Bunch *
* API Development *
* *
* Date: July 11, 1989 *
* *
*------------------------------------------------*/
#define TLA_SIZE 10
/*
* index structure, external array read into RAM upon program boot.
* This index list is sorted for easier access
*/
struct INDEX {
char tla[TLA_SIZE];/* tla to find expanded form for */
USHORT offset; /* offset * sizeof(RECORD) == fseek address into record file*/
};
/*
* record structure, external data file is a list of these structures
* does not have to be sorted
*/
struct RECORD {
char tla[TLA_SIZE];/* the tla of record, all NULLs means a deleted entry */
USHORT offset; /* offset of next record with this TLA */
char expanded[80]; /* the expanded tla */
char explain[160]; /* an explaination of the tla, what it is or means */
};
/*
* communication buffer passed into the server dropin module, how you get
* this information from the client is up to the particular program
*/
struct COMMBUFFER {
int type; /* type of communication - see types below */
struct RECORD record; /* information offered */
};
/*
* Types of requests that come to server, these can be ored '|' together
*/
#define ADD_TO_LIST 0x0001 /* add new tla (future) */
#define QUERY 0x0002 /* query to get expanded string only */
#define SORT 0x0004 /* sort file and create new index */
#define DELETE 0x0008 /* delete this tla from index and file */
#define WRITE 0x0010 /* write modified record back to file */
/*
* possible error messages
*/
#define RECORD_NOT_FOUND 200
#define RECORD_FOUND 0